Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming


Defining the destructor

A class can define a special method called its destructor, which always executes when an instance of the class is deleted (destroyed). Progress allows you to define a destructor as a named block that always begins with the DESTRUCTOR statement and always ends with the END DESTRUCTOR statement. A destructor must have the same name as the name of the class in which it is defined. A destructor is always PUBLIC, takes no parameters, and has no return type. For more information on defining destructors, see the "Defining the class destructor" section.

Comparison with procedure-based programming

Persistent procedures have no equivalent for a destructor.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095